package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:23:49 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductFeatureBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductFeature productFeature;

  protected BeanMap getBeanMap() {

    return new BeanMap(productFeature);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductFeatureDAO.Id);

    mappedDaoFields.put(
        "featureCode", com.ourteam.product.requirement.dao.IProductFeatureDAO.FeatureCode);

    mappedDaoFields.put(
        "featureName", com.ourteam.product.requirement.dao.IProductFeatureDAO.FeatureName);

    mappedDaoFields.put(
        "parentId", com.ourteam.product.requirement.dao.IProductFeatureDAO.ParentId);

    mappedDaoFields.put(
        "productDefineId", com.ourteam.product.requirement.dao.IProductFeatureDAO.ProductDefineId);

    mappedDaoFields.put("remarks", com.ourteam.product.requirement.dao.IProductFeatureDAO.Remarks);

    mappedDaoFields.put("status", com.ourteam.product.requirement.dao.IProductFeatureDAO.Status);

    mappedDaoFields.put("canTest", com.ourteam.product.requirement.dao.IProductFeatureDAO.CanTest);

    mappedDaoFields.put(
        "keyFeature", com.ourteam.product.requirement.dao.IProductFeatureDAO.KeyFeature);

    mappedDaoFields.put(
        "sortIndex", com.ourteam.product.requirement.dao.IProductFeatureDAO.SortIndex);

    mappedDaoFields.put("indent", com.ourteam.product.requirement.dao.IProductFeatureDAO.Indent);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductFeatureBean() {
    super();

    this.productFeature = new com.ourteam.product.requirement.dao.ProductFeature();
  }

  public ProductFeatureBean(com.ourteam.product.requirement.dao.ProductFeature productFeature) {
    super();

    this.productFeature = productFeature;
  }

  public com.ourteam.product.requirement.dao.ProductFeature convertToProductFeature() {
    return this.productFeature;
  }

  public com.ourteam.product.requirement.dao.ProductFeature convertTo() {
    return this.productFeature;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productFeature.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productFeature.setId(id);
  }

  /**
   * Get featureCode
   *
   * @return String
   */
  public String getFeatureCode() {
    return (String) this.productFeature.getFeatureCode();
  }

  /**
   * Set featureCode
   *
   * @parameter String
   */
  public void setFeatureCode(String featureCode) {

    this.productFeature.setFeatureCode(featureCode);
  }

  /**
   * Get featureName
   *
   * @return String
   */
  public String getFeatureName() {
    return (String) this.productFeature.getFeatureName();
  }

  /**
   * Set featureName
   *
   * @parameter String
   */
  public void setFeatureName(String featureName) {

    this.productFeature.setFeatureName(featureName);
  }

  /**
   * Get parentId
   *
   * @return long
   */
  public long getParentId() {
    return (long) this.productFeature.getParentId();
  }

  /**
   * Set parentId
   *
   * @parameter long
   */
  public void setParentId(long parentId) {

    this.productFeature.setParentId(parentId);
  }

  /**
   * Get productDefineId
   *
   * @return long
   */
  public long getProductDefineId() {
    return (long) this.productFeature.getProductDefineId();
  }

  /**
   * Set productDefineId
   *
   * @parameter long
   */
  public void setProductDefineId(long productDefineId) {

    this.productFeature.setProductDefineId(productDefineId);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productFeature.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productFeature.setRemarks(remarks);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productFeature.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productFeature.setStatus(status);
  }

  /**
   * Get canTest
   *
   * @return String
   */
  public String getCanTest() {
    return (String) this.productFeature.getCanTest();
  }

  /**
   * Set canTest
   *
   * @parameter String
   */
  public void setCanTest(String canTest) {

    this.productFeature.setCanTest(canTest);
  }

  /**
   * Get keyFeature
   *
   * @return String
   */
  public String getKeyFeature() {
    return (String) this.productFeature.getKeyFeature();
  }

  /**
   * Set keyFeature
   *
   * @parameter String
   */
  public void setKeyFeature(String keyFeature) {

    this.productFeature.setKeyFeature(keyFeature);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productFeature.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productFeature.setSortIndex(sortIndex);
  }

  /**
   * Get indent
   *
   * @return int
   */
  public int getIndent() {
    return (int) this.productFeature.getIndent();
  }

  /**
   * Set indent
   *
   * @parameter int
   */
  public void setIndent(int indent) {

    this.productFeature.setIndent(indent);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductFeatureBean) == false) {
      return false;
    } // end if

    ProductFeatureBean other = (ProductFeatureBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductFeature tempProductFeature =
        other.convertToProductFeature();

    if (tempProductFeature == null || this.productFeature == null) {
      isEqual = false;
    } else if (tempProductFeature == this.productFeature
        || tempProductFeature.equals(this.productFeature)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductFeatureBean[] toArray(
      com.ourteam.product.requirement.dao.ProductFeature[] aProductFeatures) {

    return toArray(aProductFeatures, null);
  }

  public static ProductFeatureBean[] toArray(
      com.ourteam.product.requirement.dao.ProductFeature[] aProductFeatures,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductFeatures)) {
      return new ProductFeatureBean[0];
    }

    int length = aProductFeatures.length;

    ProductFeatureBean[] beans = new ProductFeatureBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductFeatureBean(aProductFeatures[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductFeatures[i]});
      }
    }

    return beans;
  }
}
